<?php 
	$username_data = array('name' => 'username',
						'value' => $username,
						'style' => 'width: 100%');
	$email_data = array('name' => 'email',
						'value' => $email,
						'style' => 'width: 100%');
	$submit_data = array('name'=>'submit_settings',
						'value'=> 'Update');
?>

<div id="main_content">
	<h1><?php echo anchor(base_url().'index.php/user/profile/userid/'.$userid, 'User Profile');?> - <?php echo anchor(base_url().'index.php/user/settings/userid/'.$userid, 'User Settings');?></h1>
	<?php echo form_open('user/updateSettings/userid/'.$userid);?>
	<table>
		<tr>
			<th></th>
			<th></th>
			<th>Public</th>
		</tr>
		<tr>
			<td>OpenID:</td>
			<td><?php echo $openidURL;?></td>
			<?php if($public_openid == 0):?>
				<td><?php echo form_checkbox('public_openid', 'public', FALSE);?></td>
			<?php else:?>
				<td><?php echo form_checkbox('public_openid', 'public', TRUE);?></td>
			<?php endif;?>
		</tr>
		<tr>
			<td>Username:</td>
			<td><?php echo form_input($username_data);?></td>
			<td>-</td>
		</tr>
		<tr>
			<td>Email:</td>
			<td><?php echo form_input($email_data);?></td>
			<?php if($public_email == 0):?>
				<td><?php echo form_checkbox('public_email', 'public', FALSE);?></td>
			<?php else:?>
				<td><?php echo form_checkbox('public_email', 'public', TRUE);?></td>
			<?php endif;?>
		</tr>
	</table>
	<?php echo validation_errors();?>
	<?php echo form_submit($submit_data);?>
	<?php echo form_close();?>
</div>
